home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-PPC / NVRAM.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  675b  |  34 lines

  1. /*
  2.  * PreP compliant NVRAM access
  3.  */
  4.  
  5. #ifndef _PPC_NVRAM_H
  6. #define _PPC_NVRAM_H
  7.  
  8. #define NVRAM_AS0  0x74
  9. #define NVRAM_AS1  0x75
  10. #define NVRAM_DATA 0x77
  11.  
  12.  
  13. /* RTC Offsets */
  14.  
  15. #define MOTO_RTC_SECONDS        0x1FF9
  16. #define MOTO_RTC_MINUTES        0x1FFA
  17. #define MOTO_RTC_HOURS        0x1FFB
  18. #define MOTO_RTC_DAY_OF_WEEK        0x1FFC
  19. #define MOTO_RTC_DAY_OF_MONTH    0x1FFD
  20. #define MOTO_RTC_MONTH        0x1FFE
  21. #define MOTO_RTC_YEAR        0x1FFF
  22. #define MOTO_RTC_CONTROLA            0x1FF8
  23. #define MOTO_RTC_CONTROLB            0x1FF9
  24.  
  25. #ifndef BCD_TO_BIN
  26. #define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
  27. #endif
  28.  
  29. #ifndef BIN_TO_BCD
  30. #define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
  31. #endif
  32.  
  33. #endif
  34.